let obj = {
    name: "张三",
    age: 15,
    hobby: ['唱', '跳', 'rap', '篮球'],
    other: {
        keyOne: "其他",
        age: 19,
        hobby: ['唱', '跳', 'rap', '篮球'],
        obj: {
            ccc: 12
        }
    }
}

/**
 * 深度克隆
 * @param {any} property 
 */
function depthClone(target) {
    let result;
    if (typeof target == "object") {
        if (Array.isArray(target)) {
            result = [];
            target.forEach((item) => {
                result.push(depthClone(item));
            })
        } else if ('[object RegExp]' == Object.prototype.toString.call(target) || '[object Date]' == Object.prototype.toString.call(target)) {
            result = target
        } else if (target === null) {
            result = null
        } else {
            result = {}
            for (let item in target) {
                result[item] = depthClone(target[item])
            }
        }
    } else {
        result = target;
    }
    return result;
}

console.log(depthClone(obj))